<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String cookieName = "AirportUser";
	Cookie cookies[] = request.getCookies();
	String username = null;
	if (cookies != null) {
		for (int i = 0; i < cookies.length; i++) {
			if (cookies[i].getName().equals(cookieName)) {
				username = cookies[i].getValue();
				break;
			}
		}
	}
%>
	<title>Airport Traveler App | CSE 5911 Project AU12</title>
 <!--[if IE]>
	<link rel="stylesheet" type="text/css" href="ie.css" />
	ie
<![endif]-->
<link rel="stylesheet" media="screen and (min-device-width: 800px)" href="full_style.css" />
<link rel='stylesheet' media='screen and (min-width: 300px) and (max-width: 799px)' href='mobile_style.css' />
<html>
	<center>
  
<header> 
    
    
		<table width="100%">
		<tr>
		<td width="35%"><a href="<s:url action = "index"/>"><img width="100%" src="images/logo.png" border="0"></a></td>

		<td width="65"><p align="right">
		<table><tr>
		<td><a href="<s:url action="flightTimes"/>"><img width="100%" src="images/flight_times.png" border="0"></a><br><a href="<s:url action="terminalMap"/>"><img width="100%" src="images/terminal_maps.png" border="0"></a></td>
		<td>
		
		</td>
		</tr></table>
		</p>
		</td>
		</tr>

		<tr><td valign="top">
		<% if (username != null) { %>
		Hello, <a href="<s:url action="viewprofile"/>"><s:property value="myUserName"/></a> ! 
		<%;} else { %>
		You are not logged in, <a href="signup.jsp">Click Here to Signup!</a>
		<%;} %>
		</td><td align="right">
	
		 <%if (username != null) { %> <a href="logout">Logout</a> <%; } %>
		</tr></td></table> 
		</p>
		
	</header>	


	<div>
		<%
			if (username != null) {
		%>
		<table>
			<tr>
				<td><b><s:property value="username" />'s</b> Profile:
					<hr> User Name: <s:property value="username" /><br>
					Email Address: <s:property value="email" /><br>
					Gender: <s:property value="gender"/><br>
					Age: <s:property value="age" /><br>
					Occupation: <s:property value="occupation" /><br>
					Travel Reason: <s:property value="travelReason" /><br>
					<img width="100" height="100" src="<s:property value="avatar"/>"/><br>
					<a href="<s:url action = "sendPMPage"><s:param name = "receiver"><s:property value="username"/></s:param></s:url>">Send a Private Message (^.^)</a>
				</td>
			</tr>
		</table>
		<%
			;
			} else {
		%>
		You are not logged in, <a href="signup.jsp">Click Here to Signup!</a>
		<%
			;
			}
		%>
	</div>

  <footer>
	<font size="1">
	<a href="user_guide.jsp">Help</a>| Copyright 2012
	</font>
	
	</footer>
	</center>
</html>